package demo.xlj.yuyi.studentapp;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;

import demo.xlj.yuyi.studentapp.myView.OverTextView;
import demo.xlj.yuyi.studentapp.myView.TiMiDialog;
import demo.xlj.yuyi.studentapp.myadapter.TiMiInterface;

public class TestActivity2 extends AppCompatActivity {

    private OverTextView mOverTextView;
    private ImageView mImageView;
    private TiMiDialog mTiMiDialog;
    private int po=50;

    /**
     * 主要是为了演示一些小的demo
     * @param savedInstanceState
     */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test2);

        mOverTextView = (OverTextView) findViewById(R.id.my_over_text_view);

        mOverTextView.setText("山东师范大学附属中学");

        mTiMiDialog  = new TiMiDialog(TestActivity2.this);

        mTiMiDialog.setData(1000,1000);

        mImageView = (ImageView) findViewById(R.id.ImageView_test);

        mImageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                mTiMiDialog.showDialog(po);
                po = po+30;
            }
        });

        mTiMiDialog.setTiMiInterface(new TiMiInterface() {
            @Override
            public void sendPostion(int position) {
                Log.d("event_xlj","获取的位置是："+position);
            }
        });


    }
}
